package com.lf.freezingpoint.controller;

import com.lf.freezingpoint.common.entity.R;
import com.lf.freezingpoint.entity.SysPermission;
import com.lf.freezingpoint.service.SysPermissionService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.logging.Logger;

@RestController
@Tag(name = "权限管理", description = "权限管理接口文档")
@RequestMapping("/api/permission")
public class PermissionController {
    private static final Logger logger = Logger.getLogger(PermissionController.class.toString());
    @Autowired
    private SysPermissionService sysPermissionService;

    @Operation(summary = "获取所有的权限信息")
    @GetMapping("/getAllPermissionInfo")
    public R getAllPermissionInfo() {
        List<SysPermission> sysPermissionList = sysPermissionService.getAllPermissionInfo();
        return R.ok(sysPermissionList, "获取成功");
    }


}
